A container runs as part of an application server to provide enterprise applications with a high level of abstraction using server-side application components that encapsulate the business logic of the applications. Here server-side application components can be instances of a programmable class (also referred to as class), which can be but is not limited to, a JAVA® bean, an Enterprise JAVA® Bean (EJB), an interface, a module, and other suitable concepts, and EJB will be used to illustrate the various embodiments of the invention in the following context. Two important types of EJBs are: the entity bean, which is a component that represents an object-oriented view of some entities stored in a persistent storage, such as a database, and the session bean, which is a component in the container that represents some business logic running on the application server. A session bean can be either stateful or stateless.